#include "SMPPSarTotalSegments.hpp"

using namespace smpp::pdu;

SarTotalSegments::SarTotalSegments(const quint8 nValue):
TLV(TLVtags::TAG_SAR_TOTAL_SEGMENTS,1),_Value(nValue){}

SarTotalSegments::SarTotalSegments(
const SarTotalSegments &nSarTotalSegments):
TLV(nSarTotalSegments),_Value(nSarTotalSegments.getValue()){}

bool SarTotalSegments::operator ==(
	const SarTotalSegments &nSarTotalSegments) const{
	return (TLV::operator == (nSarTotalSegments) && 
			_Value == nSarTotalSegments.getValue());
}

bool SarTotalSegments::operator !=(
	const SarTotalSegments &nSarTotalSegments) const{
	return !this->operator == (nSarTotalSegments);
}

SarTotalSegments &SarTotalSegments::operator = (
	const SarTotalSegments &nSarTotalSegments){
	if(*this == nSarTotalSegments)
		return *this;
	TLV::operator = (nSarTotalSegments);
	_Value = nSarTotalSegments.getValue();
	return *this;
}

void SarTotalSegments::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 SarTotalSegments::getValue() const{
	return _Value;
}
